{% extends "enterprise/base.html" %}

{% block css %}
{% endblock %}

{% block content %}
            <script type="text/javascript">
                var primary_menu = "menu_0";
                var sub_menu = "menu_0_3";
            </script>
            <div class="col-md-12">
            <form method="post" enctype="multipart/form-data" action="/basic/law/submitPollution/" class="formSubmit">
                <!-- <div class="panel panel-primary">
                    <div class="panel-heading">
                        <div class="panel-title"><h3>法律法规遵守情况</h3></div>
                    </div>
                </div> -->
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <div class="panel-title"><h3>二、污染物达标排放情况（附一年内环境监测报告）</h3></div>
                        <div class="panel-options">
                            <a href="#" data-rel="collapse"><i class="entypo-down-open"></i></a>
                            <!--<a href="#" data-rel="reload"><i class="entypo-arrows-ccw"></i></a>-->
                        </div>
                    </div>
                    <div class="panel-body with-table">

                        <form method="post" enctype="multipart/form-data" action="/basic/law/submitPollution/">
                            <table class="input_in table-detail">
                                <tr>
                                    <th width="110">项 目</th>
                                    <th>
                                        <table>
                                            <tr>
                                                <th width=160>监测因子名称</th>
                                                <th width=100>执行标准号</th>
                                                <th width=120>执行级别</th>
                                                <th width=100>达标情况</th>
                                                <th width=140>不达标情况说明</th>
                                                <th width=40>操作</th>
                                            </tr>
                                        </table>
                                    </th>
                                </tr>
                                <tr>
                                    <td>废水</td>
                                    <td>
                                        <table>
                                        {% if list_1 %}
                                            {% for list in list_1 %}
                                                <tr>
                                                    <td width=160><input type="text"  datatype="*" name="name1" placeholder="请输入" value="{{ list.name }}"></td>
                                                    <td width=100><input type="text"  datatype="*" name="code1" placeholder="请输入" value="{{ list.code }}"></td>
                                                    <td width=120>
                                                        <input type="text"  datatype="*" name="level1" placeholder="请输入" value="{{ list.level }}"></td>
                                                    <td width=100>
                                                        <select name="status1">
                                                            {% if list.status == '0' %}
                                                                <option value="0" selected="selected">不达标</option>
                                                                <option value="1">达标</option>
                                                            {% endif %}
                                                            {% if list.status == '1' %}
                                                                <option value="0">不达标</option>
                                                                <option value="1" selected="selected">达标</option>
                                                            {% endif %}
                                                        </select></td>
                                                    <td width=140>
                                                        <input type="text"  datatype="*" name="sm1" placeholder="请输入" value="{{ list.sm }}"></td>
                                                    <td width=60>
                                                        {% if forloop.counter == 1 %}
                                                            <input type="button" value="添加" class="btn btn-success" onclick="addFile(this)"></td>
                                                        {% else %}
                                                            <input type="button" value="删除" class="btn btn-danger" onclick="delFile(this)"></td>
                                                        {% endif %}
                                                </tr>
                                            {% endfor %}
                                        {% else %}
                                                    <tr>
                                                        <td width=160><input type="text"  datatype="*" name="name1" placeholder="请输入"></td>
                                                        <td width=100><input type="text"  datatype="*" name="code1" placeholder="请输入"></td>
                                                        <td width=120>
                                                            <input type="text"  datatype="*" name="level1" placeholder="请输入" value=""></td>
                                                        <td width=100>
                                                            <select name="status1">
                                                                <option value="0">不达标</option>
                                                                <option value="1">达标</option>
                                                            </select></td>
                                                        <td width=140>
                                                            <input type="text"  datatype="*" name="sm1" placeholder="请输入" value="{{ list.sm }}"></td>
                                                        <td width=60><input type="button" value="添加" class="btn btn-success" onclick="addFile(this)"></td>
                                                    </tr>
                                        {% endif %}
                            </table>
                                    </td>
                                    
                                </tr>
                                <tr>
                                    <td>废气</td>
                                    <td>
                                        <table>
                                            {% if list_2 %}
                                                {% for list in list_2 %}
                                                    <tr>
                                                        <td width=160><input type="text"  datatype="*" name="name2" placeholder="请输入" value="{{ list.name }}"></td>
                                                        <td width=100><input type="text"  datatype="*" name="code2" placeholder="请输入" value="{{ list.code }}"></td>
                                                        <td width=120>
                                                            <input type="text"  datatype="*" name="level2" placeholder="请输入" value="{{ list.level }}"></td>
                                                        <td width=140>
                                                            <select name="status2">
                                                                {% if list.status == '0' %}
                                                                    <option value="0" selected="selected">不达标</option>
                                                                    <option value="1">达标</option>
                                                                {% endif %}
                                                                {% if list.status == '1' %}
                                                                    <option value="0">不达标</option>
                                                                    <option value="1" selected="selected">达标</option>
                                                                {% endif %}
                                                            </select></td>
                                                        <td width=140>
                                                            <input type="text"  datatype="*" name="sm2" placeholder="请输入" value="{{ list.sm }}"></td>
                                                        <td width=60>
                                                            {% if forloop.counter == 1 %}
                                                            <input type="button" value="添加" class="btn btn-success" onclick="addFile(this)"></td>
                                                        {% else %}
                                                            <input type="button" value="删除" class="btn btn-danger" onclick="delFile(this)"></td>
                                                        {% endif %}
                                                    </tr>
                                                {% endfor %}
                                            {% else %}
                                                <tr>
                                                    <td width=160><input type="text"  datatype="*" name="name2" placeholder="请输入"></td>
                                                    <td width=100><input type="text"  datatype="*" name="code2" placeholder="请输入"></td>
                                                    <td width=120>
                                                        <input type="text"  datatype="*" name="level2" placeholder="请输入" value=""></td>
                                                    <td width=100>
                                                        <select name="status2">
                                                            <option value="0">不达标</option>
                                                            <option value="1">达标</option>
                                                        </select></td>
                                                    <td width=140>
                                                        <input type="text"  datatype="*" name="sm2" placeholder="请输入" value="{{ list.sm }}"></td>
                                                    <td width=60><input type="button" value="添加" class="btn btn-success" onclick="addFile(this)"></td>
                                                </tr>
                                            {% endif %}
                                        </table>
                                    </td>
                                    
                                </tr>
                                <tr>
                                    <td>噪声</td>
                                    <td>
                                        <table>
                                            {% if list_3 %}
                                                {% for list in list_3 %}
                                                    <tr>
                                                        <td width=160><input type="text"  datatype="*" name="name3" placeholder="请输入" value="{{ list.name }}"></td>
                                                        <td width=100><input type="text"  datatype="*" name="code3" placeholder="请输入" value="{{ list.code }}"></td>
                                                        <td width=120>
                                                            <input type="text"  datatype="*" name="level3" placeholder="请输入" value="{{ list.level }}"></td>
                                                        <td width=140>
                                                            <select name="status3">
                                                                {% if list.status == '0' %}
                                                                    <option value="0" selected="selected">不达标</option>
                                                                    <option value="1">达标</option>
                                                                {% endif %}
                                                                {% if list.status == '1' %}
                                                                    <option value="0">不达标</option>
                                                                    <option value="1" selected="selected">达标</option>
                                                                {% endif %}
                                                            </select></td>
                                                        <td width=140>
                                                            <input type="text"  datatype="*" name="sm3" placeholder="请输入" value="{{ list.sm }}"></td>
                                                        <td width=60>
                                                            {% if forloop.counter == 1 %}
                                                                <input type="button" value="添加" class="btn btn-success" onclick="addFile(this)"></td>
                                                                {% else %}
                                                                <input type="button" value="删除" class="btn btn-danger" onclick="delFile(this)"></td>
                                                            {% endif %}
                                                        
                                                    </tr>
                                                {% endfor %}
                                            {% else %}
                                                <tr>
                                                    <td width=160><input type="text"  datatype="*" name="name3" placeholder="请输入"></td>
                                                    <td width=100><input type="text"  datatype="*" name="code3" placeholder="请输入"></td>
                                                    <td width=120>
                                                        <input type="text"  datatype="*" name="level3" placeholder="请输入" value=""></td>
                                                    <td width=100>
                                                        <select name="status3">
                                                            <option value="0">不达标</option>
                                                            <option value="1">达标</option>
                                                        </select></td>
                                                    <td width=140>
                                                        <input type="text"  datatype="*" name="sm3" placeholder="请输入" value="{{ list.sm }}"></td>
                                                    <td width=60><input type="button" value="添加" class="btn btn-success" onclick="addFile(this)"></td>
                                                </tr>
                                            {% endif %}
                                        </table>
                                    </td>
                                    
                                </tr>
                                <tr>
                                    <td>一年内监测报告</td>
                                    <td>    
                                        <table>
                                                    {% if law_files %}
                                                        {% for file in law_files %}
                                                            <tr>
                                                                <td width=300>
                                                                    <input style="width:200px;" type="text" value="{{file.file_name}}" name="oldfile">
                                                                    <button type="button" onclick="choseFile(this)">选择</button>
                                                                    <input style="display:none;" type="file" name="file" placeholder="请输入" value="">
                                                                </td>
                                                                {%if forloop.counter == 1%}
                                                                    <td width=60>
                                                                        <input type="button" value="添加" class="btn btn-success" onclick="addFile(this)">
                                                                    </td>
                                                                {% else %}
                                                                    <td width=60>
                                                                        <input type="button" value="删除" class="btn btn-danger" onclick="delFile(this)">
                                                                    </td>
                                                                {% endif %}
                                                            </tr>
                                                        {% endfor %}
                                                    {% else %}
                                                        <tr>
                                                            <td width=300><input style="width:200px;" type="text" value="{{file.upload_file}}">
                                                                <button type="button" onclick="choseFile(this)">选择</button>
                                                                <input style="display:none;" type="file" name="file" placeholder="请输入" value="">
                                                            </td>
                                                            <td width=60>
                                                                <input type="button" value="添加" class="btn btn-success" onclick="addFile(this)">
                                                            </td>
                                                        </tr>
                                                    {% endif %}
                                        </table>
                                    </td>   
                                </tr>
                                <tr>
                                    <td>备注</td>
                                    <td><textarea name="remark"   placeholder="请输入" style="resize:no;" >{{ remark_2.remark }}</textarea></td>
                                </tr>
                                </table>
                    </div>
                </div>
                <div class="buttons">
                    <input onclick="submitSave()" type="submit" class="btn btn-orange btn-lg" value="暂存">
                                <input type="submit" class="btn btn-success btn-lg" value="确认">
                    <!-- <input class="btn btn-info btn-lg" type="reset" value="重置"/> -->
                </div>
            </form>
            </div>
{% endblock %}
{% block js %}
{% endblock %}